﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/layui/css/layui.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/layui/css/layui.mobile.css">
<script src="${pageContext.request.contextPath}/static/layui/layui.js"></script> 

<title>充值</title>
<style type="text/css">
.roles label {
	width: 150px;
	display: block;
	float: left;
	padding-right: 6px;
}
</style>
<!--百度MIP加速代码 -->
 <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
 <!--TODO: canonical href需要替换成原页面url-->
 <link rel="canonical" href="http://www.wurao.xin/index.html">
 <!-- noscript 标签是为了在不支持 script 的环境下快速的展现 MIP 页面，推荐使用 -->
 <noscript>
 	<style mip-officialrelease>
                body {
                    -webkit-animation: none;
                       -moz-animation: none;
                        -ms-animation: none;
                            animation: none;
                }
  	</style>
 </noscript>

</head>
<body>
  <div class="layui-row">
    <div class="layui-col-md12">
    	<ul class="layui-nav" lay-filter="">
		  <li class="layui-nav-item"><a href="${pageContext.request.contextPath}/pay/pay.html">在线支付</a></li>
		  <li class="layui-nav-item"><a href="${pageContext.request.contextPath}/pay/toOrderListPage.html">订单列表</a></li>
		</ul>
    </div>
  </div>
	<div class="layui-container">  
	 <div class="layui-row">
      <div class="layui-col-md12">
    
    	<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
		  <legend>在线支付</legend>
		</fieldset>
    
    	<form class="layui-form"  method="post">
    	
    		<div class="layui-form-item">
			    <label class="layui-form-label"><font style="color=red;">* </font> 支付金额:</label>
			    <div class="layui-input-block">
			    	 <input type="text" name="rechargeMoney" lay-verify="required|number" placeholder="请输入赞助的金额" autocomplete="off" class="layui-input">
			    </div>
			</div>
			  
    		<div class="layui-form-item">
			    <label class="layui-form-label">支付人:</label>
			    <div class="layui-input-block">
			      <input type="text" name="nickName" lay-verify="required" placeholder="请输入您的大名或者昵称" autocomplete="off" class="layui-input">
			    </div>
			</div>
			
			<div class="layui-form-item">
			    <label class="layui-form-label">QQ:</label>
			    <div class="layui-input-block">
			      <input type="text" name="qq" lay-verify="required|number" placeholder="请输入您的QQ号" autocomplete="off" class="layui-input">
			    </div>
			</div>
			
			<div class="layui-form-item layui-form-text">
			    <label class="layui-form-label">留言:</label>
			    <div class="layui-input-block">
			      <textarea name="remark" placeholder="请输入留言内容" class="layui-textarea"></textarea>
			    </div>
			  </div>
			  
			  <div class="layui-form-item">
			    <label class="layui-form-label">支付方式:</label>
			    <div class="layui-input-block">
			      <input type="radio" name="way" value="支付宝" title="支付宝" checked="">
			    </div>
			  </div>
    	
    		<div class="layui-form-item">
			    <div class="layui-input-block">
			      <button class="layui-btn" lay-submit="" lay-filter="paySubmit">支付提交</button>
			      <br><br><span style="color:red;font-size:2px;">由于营业执照未审批，暂时只支持沙箱环境</span>
			    </div>
			  </div>
    	</form>
      </div>
     </div>
     </div>

<script>
//注意：导航 依赖 element 模块，否则无法进行功能性操作
layui.use('element', function(){
  var element = layui.element;
});
</script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
layui.use(['form'], function(){
	  var form = layui.form;
	 
	  //监听提交
	  form.on('submit(paySubmit)', function(data){
	    if(data.field.way=='支付宝'){
	    	data.form.action="/pay/submitRecharge.html";
	    }else if(data.field.way=='微信'){
	    	data.form.action="#";
	    }
	    return true;
	  });
	});
</script>
</body>
</html>